0 CLS:DIMW(383),SX(7),SY(7),EX(6),EY(6),BX(6),BY(6),C(7),C,P,X,Y,L,T,P,F,Z,MC,I$
1 GOSUB3000:GOSUB1200:GOTO60
2 RESET(X,Y):NEXT:NEXT:GOTO9
3 NEXT:NEXT:GOTO9
4 ONPOINT(X,Y)+1GOTO3,3,3,2,2,3,3:NEXT:NEXT:GOTO9
5 ONPOINT(X,Y)+1GOTO3,3,3,2,3,3,2:NEXT:NEXT:GOTO9
6 FORT=0TO1STEP.01:FORP=1TO6:X=INT((1-T)*(1-T)*SX(P)+2*(1-T)*T*BX(P)+T*T*EX(P))
7 Y=INT((1-T)*(1-T)*SY(P)+2*(1-T)*T*BY(P)+T*T*EY(P)):ON1-(Y>=0ANDY<F)GOTO3:ONC(P)GOTO4,5:NEXT:NEXT
9 FORT=1TO6:C=((EY(T)/2)*32)+(EX(T)/2):IFC>0ANDC<385THENP=PEEK(MC+C):PRINT@C,CHR$(159);:SOUND1,1:IFP>175THENW(C)=255
10 NEXT:FORP=1TO3:FORT=4TO7:IFEX(P)=SX(T)ANDEY(P)=SY(T)THENGOSUB29:RD=RD+1
12 NEXT:NEXT
14 FORP=3TO6:FORT=0TO3:IFEX(P)=SX(T)ANDEY(P)=SY(T)THENGOSUB29:UD=UD+1
16 NEXT:NEXT
28 RETURN
29 C=((SY(T)/2)*32)+(SX(T)/2):IFT=7ORT=0THENPOKEMC+C,42:W(C)=42:SX(T)=99+P:SY(T)=99+P:C(T)=0:GOTO31
30 POKEMC+C,30:W(C)=30:SX(T)=99+P:SY(T)=99+P:C(T)=0
31 RETURN
40 C=0:FORX=16384TO16384+383:POKEX,W(C):C=C+1:NEXT:RETURN
60 FORP=0TO3:C(P)=1:SX(P)=0:SY(P)=0:NEXT:FORP=4TO7:C(P)=2:SX(P)=0:SY(P)=0:NEXT
61 PRINT@480,"USA ENTER COMMAND BASE        ";:GOSUB500:GOSUB200
62 PRINT@480,"USA ENTER ICBM BASES          ";:GOSUB300:GOSUB200
70 PRINT@480,"USSR ENTER COMMAND BASE       ";:GOSUB600:GOSUB200
72 PRINT@480,"USSR ENTER ICBM BASES         ";:GOSUB400:GOSUB200
74 PRINT@480,"USA ENTER TARGETS             ";:GOSUB350
76 PRINT@480,"USSR ENTER TARGETS            ";:GOSUB450:PRINT@480,"MISSILES LAUNCHED!            ";
80 GOSUB6
82 IFRD>=3THENPRINT@480,"USA WINS!                     ";
84 IFUD>=3THENPRINT@480,"                 USSR WINS!   ";
86 IFUD>=3ANDRD>=3THENPRINT@480,"NEITHER SIDE WINS.            ";
88 IFUD>=3ORRD>=3THEN150
100 PRINT@480,"PRESS ANY KEY FOR NEXT LAUNCH";
110 IFINKEY$=""THEN110
120 GOSUB40:GOSUB200:GOTO74
150 FORP=0TO7:C=((SY(P)/2)*32)+(SX(P)/2):IFC(P)<>0AND(P=0ORP=7)THENPRINT@C,"*";:GOTO170
160 IFC(P)<>0THENPRINT@C,"^";
170 NEXT:GOSUB200:PRINT@352+32,"PLAY AGAIN (Y/N)";
180 I$=INKEY$:Z=RND(1000):IFI$=""THEN180
185 IFI$="Y"THENCLS:RESTORE:GOSUB1200:GOTO60
190 IFI$="N"THENEND
195 GOTO180
200 FORT=1TO3:PRINT@352+(T*32),"                                ";:NEXT:RETURN
300 FORP=1TO3
310 PRINT@352+(32*P),P;"(X,Y)";:INPUTX,Y:IFX<1ORX>31ORY<1ORY>12THEN310
320 SX(P)=X*2:SY(P)=Y*2:IFPOINT(SX(P),SY(P))<>6THEN310
325 FORT=0TO3:IF(SX(T)=SX(P)ANDSY(T)=SY(P))ANDT<>PTHEN310
330 NEXT:NEXT:RETURN
350 FORP=1TO3:EX(P)=999+P:EY(P)=999+P:NEXT:FORP=1TO3:IFC(P)=0THEN380
360 PRINT@352+(32*P),P;"(X,Y)";:INPUTX,Y:IFX=0ORY=0THENGOSUB40:GOSUB200:GOTO360
365 IFX<16ORX>31ORY<1ORY>12THEN360
370 EX(P)=X*2:EY(P)=Y*2
375 BX(P)=ABS(SX(P)-EX(P)):BY(P)=-10+RND(40)
380 NEXT:RETURN
400 FORP=4TO6
410 PRINT@352+16+(32*(P-3)),P-3;"(X,Y)";:INPUTX,Y:IFX<1ORX>31ORY<1ORY>12THEN410
420 SX(P)=X*2:SY(P)=Y*2:IFPOINT(SX(P),SY(P))<>4THEN410
425 FORT=4TO7:IF(SX(T)=SX(P)ANDSY(T)=SY(P))ANDT<>PTHEN410
430 NEXT:NEXT:RETURN
450 FORP=4TO6:EX(P)=999+P:EY(P)=999+P:NEXT:FORP=4TO6:IFC(P)=0THEN480
460 PRINT@352+16+(32*(P-3)),P-3;"(X,Y)";:INPUTX,Y:IFX=0ORY=0THENGOSUB40:GOSUB200:GOTO460
465 IFX<1ORX>16ORY<1ORY>12THEN460
470 EX(P)=X*2:EY(P)=Y*2
475 BX(P)=ABS(SX(P)-EX(P)):BY(P)=-10+RND(40)
480 NEXT:RETURN
500 P=0
510 PRINT@384," * (X,Y)";:INPUTX,Y:IFX<1ORX>31ORY<1ORY>12THEN510
520 SX(P)=X*2:SY(P)=Y*2:IFPOINT(SX(P),SY(P))<>6THEN510
530 RETURN
600 P=7
610 PRINT@384+16," * (X,Y)";:INPUTX,Y:IFX<1ORX>31ORY<1ORY>12THEN610
620 SX(P)=X*2:SY(P)=Y*2:IFPOINT(SX(P),SY(P))<>4THEN610
630 RETURN
1000 DATA"ammmmmmmmmmmmmmmmmmmmmmmmmmmmmmm"
1010 DATA"bkkmmmmmmmmmmmmmmmmmmmmmmmmmmmmm"
1020 DATA"ckkmmmmmmmmmmmmmmmmmmmmllllllllm"
1030 DATA"dmmkmmmmmmmmmmmmmmllllllllllllll"
1040 DATA"emmmmmmmmmmmmmmmmllllllllllllllm"
1050 DATA"fkkkkkkkkkmmkkmmmmlllllllllllmlm"
1060 DATA"gkkkkkkkkkkkkkmmmmmmlmlllllmmmmm"
1070 DATA"hkkkkkkkkkkkkmmmmmmmmmmlmmmmmmmm"
1080 DATA"immkkkkkkkkkmmmmmmmmmmmmmmmmmmmm"
1090 DATA"jkmmmmkkkmmkmmmmmmmmmmmmmmmmmmmm"
1100 DATA"ammmmmmmmmbmmmmmmmmmcmmmmmmmmmdm"
1110 DATA"abcdefghijabcdefghijabcdefghijab"
1200 C=0:P=16384:FORY=1TO12:READA$:FORX=1TO32:A=ASC(MID$(A$,X,1)):IFA<107THENW(C)=A-49:GOTO1220
1205 IFA=107THENW(C)=223:GOTO1220
1210 IFA=108THENW(C)=191:GOTO1220
1215 W(C)=175
1220 POKEP,W(C):C=C+1:P=P+1:NEXT:NEXT
1230 F=24:MC=16384:RD=0:UD=0:RETURN
2000 FORT=1TOLEN(N$):PRINTMID$(N$,T,1);:FORZ=1TO50:NEXT:NEXT:RETURN
3000 CLS:N$="WOULD YOU LIKE TO PLAY A GAME?":GOSUB2000:PRINT:FORZ=1TO2000:NEXT
3005 N$="YES":GOSUB2000:PRINT
3010 N$="HOW ABOUT:":GOSUB2000:PRINT
3020 N$="TACTICAL THERMO-NUCLEAR WAR":GOSUB2000:PRINT
3030 N$="TIC-TAC-TOE":GOSUB2000:PRINT
3040 N$="INPUT CHOICE":GOSUB2000:FORZ=1TO2000:NEXT:PRINT
3050 N$="TACTICAL THERMO-NUCLEAR WAR":GOSUB2000:PRINT
3060 N$="OK.":GOSUB2000:PRINT:PRINT:PRINT
3065 N$="HERE ARE THE INSTRUCTIONS:":GOSUB2000:PRINT
3070 N$="ENTER THE COORDINATES OF YOUR":GOSUB2000:PRINT
3080 N$="COMMAND BASE AND 3 ICBM SILOS.":GOSUB2000:PRINT
3090 N$="EACH ROUND YOU WILL ENTER":GOSUB2000:PRINT
3100 N$="TARGET COORDINATES FOR EACH":GOSUB2000:PRINT
3110 N$="OF YOUR SURVIVING ICBM SILOS.":GOSUB2000:PRINT
3120 N$="YOU WIN WHEN YOU HAVE DESTROYED":GOSUB2000:PRINT
3130 N$="3 ENEMY MISSILE SILOS, OR 2":GOSUB2000:PRINT
3140 N$="SILOS AND THEIR COMMAND BASE.":GOSUB2000:PRINT
3150 N$="DESTROYED BASES AND SILOS":GOSUB2000:PRINT
3160 N$="ARE DISPLAYED IN DARK GREEN":GOSUB2000:PRINT
3170 N$="UNDAMAGED SITES ARE DISPLAYED":GOSUB2000:PRINT
3180 N$="IN LIGHT GREEN AT THE END OF":GOSUB2000:PRINT
3190 N$="THE GAME.  GOOD LUCK...":GOSUB2000:PRINT
3200 PRINT"PRESS ANY KEY TO BEGIN";
3210 I$=INKEY$:Z=RND(1000):IFI$=""THEN3210
3220 CLS:RETURN
4000 REM COPYRIGHT JIM AND CHARLIE GERRIE
4010 REM SEPT 21 2011, SYDNEY NS CANADA
4020 REM LUV TO PATTY, MADELEINE AND NAY
